{{template "header.html" .}}
<div id="form-result-message">
    <div class="message success hide">配置已更新</div>
    <div class="message error hide">配置更新失败：<span></span></div>
</div>
<div class="container" id="admin-setting-container">
    <h1 class="h1">站点设置</h1>
    <form id="admin-setting-form" class="form" action="/admin/setting/" method="post">
        <p class="item">
            <label for="admin-setting-site-domain">站点域名</label>
            <input id="admin-setting-site-domain" class="ipt" type="text" required="required" name="site_domain" value="{{.Meta.site_domain}}"/>
        </p>
        <p class="item">
            <label for="admin-setting-site-name">站点名称</label>
            <input id="admin-setting-site-name" class="ipt" type="text" required="required" name="site_name" value="{{.Meta.site_name}}"/>
        </p>
        <p class="item">
            <label for="admin-setting-site-keyword">关键字</label>
            <input id="admin-setting-site-keyword" class="ipt" type="text" name="site_keyword" value="{{.Meta.site_keyword}}"/>
        </p>
        <p class="item">
            <label for="admin-setting-site-desc">站点介绍</label>
            <input id="admin-setting-site-desc" class="ipt" type="text" name="site_desc" value="{{.Meta.site_desc}}"/>
        </p>
        <p class="item">
            <label for="admin-setting-article-size">每页文章数</label>
            <input id="admin-setting-article-size" class="ipt" type="number" value="{{.Meta.article_size}}" min="3" max="10" step="1" name="article_size"/>
        </p>
        <p class="divide"></p>
        <p class="item">
            <label for="admin-setting-comment-display">审核中评论</label>
            <select class="select" name="comment_display" id="admin-setting-comment-display">
                {{if eq .Meta.comment_display "hide"}}<option value="hide" selected>隐藏</option>{{else}}<option value="hide">隐藏</option>{{end}}
                {{if eq .Meta.comment_display "show"}}<option value="show" selected>显示</option>{{else}}<option value="show">显示</option>{{end}}
            </select>
            <label for="admin-setting-comment-notify">新评论</label>
            <select class="select" name="comment_notify" id="admin-setting-comment-notify">
                {{if eq .Meta.comment_notify "email"}}<option value="email" selected>邮件通知</option>{{else}}<option value="email">邮件通知</option>{{end}}
                {{if eq .Meta.comment_notify "close"}}<option value="close" selected>不通知</option>{{else}}<option value="close">不通知</option>{{end}}
            </select>
        </p>
        <p class="item submit">
            <label></label><input id="admin-setting-submit" class="btn" type="submit" value="更新"/>
        </p>
    </form>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        ajaxForm("#admin-setting-form");
    });
</script>
</body>
</html>